﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Tradex.Trading;

namespace Tradex.Messages {
    
    /// <summary>
    /// An OrderCreationRequestMessage requests from the receiver the creation of a specific order.
    /// This is the normal approach, as ultimately only a broker can create an order object and execute it.
    /// </summary>
    [Serializable ()]
    public sealed class OrderCreationRequestMessage : Message {

        /// <summary>
        /// Public constructor taking all arguments.
        /// </summary>
        public OrderCreationRequestMessage () {
        }

        /// <inheritdoc />
        public override MessageCode Code { get { return MessageCode.OrderCreationRequest; } }

        /// <summary>
        /// The OrderKey to be used. This is only the Tradex internal (though unique) order key.
        /// </summary>
        public OrderKey OrderKey { get; private set; }

        /// <summary>
        /// The OrderInfo to be used for the creation of the order. It contains all necessary parameters.
        /// </summary>
        public OrderInfo OrderInfo { get; private set; }

    }

}
